CREATE EXTERNAL TABLE `jms_ods`.`yl_lmdm_sys_network_expand_hf`(
    `id` bigint COMMENT ''
    , `code` string COMMENT '网点编码'
    , `name` string COMMENT '网点名称'
    , `parent_network_id` bigint COMMENT '父级网点id'
    , `parent_network_code` string COMMENT '父级网点编码'
    , `parent_network_name` string COMMENT '父级网点名称'
    , `in_distribution_id` string COMMENT '可交货转运中心id'
    , `in_distribution_code` string COMMENT '可交货转运中心编码'
    , `in_distribution_name` string COMMENT '可交货转运中心名称'
    , `out_distribution_id` string COMMENT '可派货转运中心id'
    , `out_distribution_code` string COMMENT '可派货转运中心编码'
    , `out_distribution_name` string COMMENT '可派货转运中心名称'
    , `entrepot_id` bigint COMMENT '集散网点id'
    , `entrepot_name` string COMMENT '集散网点名称'
    , `subordinate_agent_name` string COMMENT '所属代理区名称'
    , `subordinate_agent_id` string COMMENT '所属代理区id'
    , `subordinate_agent_code` string COMMENT '所属代理区code'
    , `regional_id` bigint COMMENT '大区id'
    , `regional_desc` string COMMENT '大区名称'
    , `provider_id` bigint COMMENT '省份id'
    , `provider_desc` string COMMENT '省份'
    , `city_id` bigint COMMENT '城市id'
    , `city_desc` string COMMENT '城市名称'
    , `area_id` bigint COMMENT '区域id'
    , `area_desc` string COMMENT '区域名称'
    , `first_code` string COMMENT '一段码'
    , `second_code` string COMMENT '二段码'
    , `first_and_second_code` string COMMENT '一二段码合并'
    , `country_code` string COMMENT '国家编码'
    , `country_desc` string COMMENT '国家'
    , `financial_center_id` bigint COMMENT '对应财务中心id'
    , `financial_center_code` string COMMENT '对应财务中心编码'
    , `financial_center_desc` string COMMENT '对应财务中心名称'
    , `first_franchisee_id` bigint COMMENT '一级加盟商id'
    , `first_franchisee_code` string COMMENT '一级加盟商code'
    , `first_franchisee_name` string COMMENT '一级加盟商'
    , `second_franchisee_id` bigint COMMENT '二级加盟商id'
    , `second_franchisee_code` string COMMENT '二级加盟商code'
    , `second_franchisee_name` string COMMENT '二级加盟商'
    , `longitude` string COMMENT '经度'
    , `latitude` string COMMENT '纬度'
    , `create_time` timestamp COMMENT '创建时间'
    , `update_time` timestamp COMMENT '更新时间'
    , `is_distribution_center` tinyint COMMENT '是否分拨中心标识:1是,2否'
    , `first_second_third_code` string COMMENT '三段码合并'
    , `third_code` string COMMENT '三段码'
    , `entrepot_code` string COMMENT '集散网点编码'
    , `type_id` bigint COMMENT '网点类型id')
COMMENT '基础网点信息合并'
PARTITIONED BY (`dt` string COMMENT '更新/创建日期 (yyyy-MM-dd)')
ROW FORMAT SERDE 'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe'
WITH SERDEPROPERTIES (
  'serialization.format' = '1'
)
STORED AS
  INPUTFORMAT 'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat'
  OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat'
LOCATION '/dw/hive/jms_ods.db/external/yl_lmdm_sys_network_expand_hf';